
package com.jiuqi.ccp.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ccpQuartzValue.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ccpQuartzValueForm"
 */
public class CcpQuartzValueForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _cqvGuid = null;
   private java.lang.String _cqwGuid = null;
   private java.lang.String _cqpGuid = null;
   private java.lang.String _paramValue = null;

   /**
    * Standard constructor.
    */
   public CcpQuartzValueForm() {
   }

   /**
    * Returns the cqvGuid
    *
    * @return the cqvGuid
    */
   public java.lang.String getCqvGuid() {
      return _cqvGuid;
   }

   /**
    * Sets the cqvGuid
    *
    * @param cqvGuid the new cqvGuid value
    */
   public void setCqvGuid(java.lang.String cqvGuid) {
      _cqvGuid = cqvGuid;
   }
   /**
    * Returns the cqwGuid
    *
    * @return the cqwGuid
    */
   public java.lang.String getCqwGuid() {
      return _cqwGuid;
   }

   /**
    * Sets the cqwGuid
    *
    * @param cqwGuid the new cqwGuid value
    */
   public void setCqwGuid(java.lang.String cqwGuid) {
      _cqwGuid = cqwGuid;
   }
   /**
    * Returns the cqpGuid
    *
    * @return the cqpGuid
    */
   public java.lang.String getCqpGuid() {
      return _cqpGuid;
   }

   /**
    * Sets the cqpGuid
    *
    * @param cqpGuid the new cqpGuid value
    */
   public void setCqpGuid(java.lang.String cqpGuid) {
      _cqpGuid = cqpGuid;
   }
   /**
    * Returns the paramValue
    *
    * @return the paramValue
    */
   public java.lang.String getParamValue() {
      return _paramValue;
   }

   /**
    * Sets the paramValue
    *
    * @param paramValue the new paramValue value
    */
   public void setParamValue(java.lang.String paramValue) {
      _paramValue = paramValue;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getCqvGuid() == null) {
         errors.add("cqvGuid", new ActionError("error.cqvGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
